package xiaodou.core
{
	import flash.utils.Dictionary;
	
	public class ObjectUtil
	{
		protected static var ProvinceNameIDDic:Dictionary;
		
		/**
		 * 省份的拼音字母名称 
		 */		
		private static var provinceLetterNameDic:Dictionary;
		
		public static function fill(data:Object, to:Object):void
		{
			for(var att:* in data)
			{
				if(to.hasOwnProperty(att))
					to[att] = data[att];
			}
		}

		
		public static function GetProvinceNameByID(ID:int):String
		{
			if(ProvinceNameIDDic == null)
			{
				ProvinceNameIDDic = new Dictionary();
				ProvinceNameIDDic[34] = "安徽";
				ProvinceNameIDDic[11] = "北京"
				ProvinceNameIDDic[50] = "重庆"
				ProvinceNameIDDic[35] = "福建"
				ProvinceNameIDDic[62] = "甘肃"
				ProvinceNameIDDic[44] = "广东"
				ProvinceNameIDDic[45] = "广西"
				ProvinceNameIDDic[52] = "贵州"
				ProvinceNameIDDic[46] = "海南"
				ProvinceNameIDDic[13] = "河北"
				ProvinceNameIDDic[23] = "黑龙江"
				ProvinceNameIDDic[41] = "河南"
				ProvinceNameIDDic[42] = "湖北"
				ProvinceNameIDDic[43] = "湖南"
				ProvinceNameIDDic[15] = "内蒙古"
				ProvinceNameIDDic[32] = "江苏"
				ProvinceNameIDDic[36] = "江西"
				ProvinceNameIDDic[22] = "吉林"
				ProvinceNameIDDic[21] = "辽宁"
				ProvinceNameIDDic[64] = "宁夏"
				ProvinceNameIDDic[63] = "青海"
				ProvinceNameIDDic[14] = "山西"
				ProvinceNameIDDic[37] = "山东"
				ProvinceNameIDDic[31] = "上海"
				ProvinceNameIDDic[51] = "四川"
				ProvinceNameIDDic[12] = "天津"
				ProvinceNameIDDic[54] = "西藏"
				ProvinceNameIDDic[65] = "新疆"
				ProvinceNameIDDic[53] = "云南"
				ProvinceNameIDDic[33] = "浙江"
				ProvinceNameIDDic[61] = "陕西"
				ProvinceNameIDDic[71] = "台湾"
				ProvinceNameIDDic[81] = "香港"
				ProvinceNameIDDic[82] = "澳门"
				ProvinceNameIDDic[400] = "海外"
				ProvinceNameIDDic[100] = "其他"
			}
			if(ProvinceNameIDDic[ID])
				return ProvinceNameIDDic[ID].toString();
			else
				return "其它";
		}
			
	}
}